<div id="layout_main_top">

</div>
<div id="layout_main">

{if !isset($message)}


<form action="index.php?page=signup" method="post">
<INPUT TYPE=HIDDEN NAME="action" value="signup">
<INPUT TYPE=HIDDEN NAME="rid" value="{$signup_raid.raid_id}">
  <table id="small_table" cellspacing='0'>
    <tr class="menu_header">
  	<th colspan='2'>
  	Raid subscription
  	</th>
  	</tr>
  	
  	<tr class="row_1">
	<td colspan='2' class="staticboldcenter">
	You have selected to sign up for the following raid:<br><span class="error">{$errormessage}</span><br>
	</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
		<br>
		</td>
		<td class="autonormaltop">
		<br>
		</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
			Location:
		</td>
		<td class="autonormalcenter">
			{$signup_raid.event_name}
		</td>
	</tr>
	<tr class="row_1">
		<td class="staticboldright">
			Date:
		</td>
		<td class="autonormalcenter">
			{$signup_raid.date_time|date_format:"%a %d/%m/%y"}	
		</td>
	</tr>
	<tr class="row_1">
		<td class="staticboldright">
		Time:
		</td>
		<td class="autonormalcenter">
			{$signup_raid.date_time|date_format:"%H:%M:%S"}	
		</td>
	</tr>
	<tr class="row_1">
		<td class="staticboldright">
		Character:
		</td>
		<td class="autonormalcenter">
		{$active_char.name}
		</td>
	</tr>
	<tr class="row_1">
		<td class="staticboldright">
		Class role type:
		</td>
		<td class="autonormalcenter">
		<select name="raid_role" class="large">
		{assign var='role_found' value='0'}
		
		{if $class_role_max.class_role_id eq $active_char.class_role_id and $class_role_count lt $class_role_max.max_main}
			<option value="{$class_role_max.id}">{$active_char.class_role_name}</option>
			{assign var='role_found' value='1'}
		{elseif $general_role_max.general_id eq $active_char.role_id and $general_role_count lt $general_role_max.max_main}
			<option value="{$general_role_max.id}">{$active_char.role_name}</option>
			{assign var='role_found' value='1'}
		{elseif $role_found eq 0}
		<option value="null">No open roles left.</option>
		{/if}

		</select>
		</td>
	</tr>
	<tr class="row_1">
		<td class="staticboldright">
		Auto signup type:
		</td>
		<td class="autonormalcenter">
		<select name="type" class="type">
		{if $status eq 3 and $role_found eq 1}
			<option value="main">Main</option>
			<option value="sub">Sub</option>
		{elseif $status eq 3 and $role_found eq 0}
			<option value="sub">Sub</option>
		{elseif $status eq 4}
			<option value="sub">Sub</option>
		{else}
			<option value="null">Not at all!</option>{/if}
		</select>
		</td>
	</tr>
	<tr class="row_1">
		<td class="staticboldright" valign="top">
		Comment:
		</td>
		<td class="autonormalcenter" rowspan="3">
		<textarea rows="2" cols="20" name="comment">{$comment}</textarea>
		</td>
	</tr>

	<tr class="row_1">
		<td class="staticboldright">
		</td>

	</tr>
	<tr class="row_1">
		<td class="staticboldright">
		</td>

	</tr>
	<tr class="row_1">
		<td class="staticboldright">
		<img src="./images/buttons/icon-hint.png" width="16px" height="16px" align="left"{popup text="When a main player removes his signup, place you on the main list from the sublist.<br><b>Note</b>This only works if the class limit has not been reached for your class and you are allowed to signup as a main!.<br>You will receive a penalty when you dont show up as a main with Auto queue!"  center=#overlib_center# wrap=true offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}></img>Auto Queue as sub:
		</td>
		<td class="autonormalcenter">
		<input type="checkbox" name="auto_queue" disabled>
		</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
		<br>
		</td>
		<td class="autonormalbottom">
		<br>
		</td>
	</tr>
	<tr class="row_1">
		<td class="staticboldcenter" colspan="2">
		<br>
		<input name="signup!" type="submit" value="Sign me up!">
		</td>
	</tr>
	
 </table> 
</form>

{else}



<DIV class="TableHead">
{$message_type}
</DIV>

<DIV class="MenuText">
{$message}
</DIV>




{/if}

</div>
<div id="layout_main_bottom">

</div>

